#cmake最低版本需求，不加入此行会受到警告信息
cmake_minimum_required(VERSION 2.6)

message(STATUS "******************************************************************")
message(STATUS "CMAKE_SOURCE_DIR->" ${CMAKE_SOURCE_DIR})
message(STATUS "PROJECT_SOURCE_DIR->)" ${PROJECT_SOURCE_DIR})
message(STATUS "******************************************************************")

project(SkyIPC) #项目名称

if(${PLATFORM} STREQUAL "rv1109")
    include(./cmake/rv1109.cmake)
elseif(${PLATFORM} STREQUAL "dv300")
    include(./cmake/dv300.cmake)
elseif(${PLATFORM} STREQUAL "m64x86")
    include(./cmake/m64x86.cmake)
else()
    message("error")
endif()

#指定静态和动态文件目录
link_directories(${PROJECT_SOURCE_DIR}/lib/${PLATFORM})
link_libraries(opensky)

#指定头文件目录
include_directories(./include)
include_directories(./src)

#把当前目录(.)下所有源代码文件和头文件加入变量SRC_LIST
aux_source_directory(./src SRC_LIST)

#生成应用程序
add_executable(sky ${SRC_LIST})
